package com.kakarote.admin.common;

public enum PayWayEnum {

    NULL(0, "还没有进行支付，支付方式未知"),
    WX_PAY(1, "wxPayService"),
    ALI_PAY(2, "aliPayService"),
    TRANSFER_PAY(3, "TranPayService");

    private final Integer payWay;

    private final String name;

    PayWayEnum(Integer payWay, String name) {
        this.name = name;
        this.payWay = payWay;
    }

    public static String getName(Integer payWay) {
        for (PayWayEnum a : PayWayEnum.values()) {
            if (a.payWay.equals(payWay)) {
                return a.name;
            }
        }
        return null;
    }

    public Integer getPayWay() {
        return payWay;
    }

    public String getName() {
        return name;
    }
}
